Skip to content

Add iOS pane action workflows - #429

Merged
BunsDev merged 3 commits into
mainfrom
feat/ios-pane-actions-guarded-confirmations
Sep 10, 2026
Merged

Add iOS pane action workflows#429
BunsDev merged 3 commits into
mainfrom
feat/ios-pane-actions-guarded-confirmations

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 10, 2026

Copy link
Copy Markdown
Member

Outcome

Refs #218 and #200.

Adds the native iOS pane action menu wiring for remote merge / create-PR / rename / close flows, plus distinct native stop and cleanup confirmations, so mobile pane actions now surface guarded lifecycle choices through production UI instead of dead-end placeholders.

Scope and boundaries

  • Wired RemoteActionStore + ActionSheetView into the production iOS app shell so remote pane actions present visible progress, interactive prompts, and terminal results.
  • Expanded PaneControlsMenu to expose merge, create pull request, rename, browse files, rituals, stop, and close-and-cleanup actions with stale / in-flight disabling.
  • Kept cleanup routed through PaneAction.CLOSE; the native cleanup confirmation only gates entry into the existing close workflow.
  • Added deterministic fixture support for remote pane actions and published rituals so UI tests can exercise the production composition path.
  • Did not change Beads state, GitHub mirror issue bodies, workflow/release/signing infrastructure, or merge behavior beyond the mobile presentation / invocation surface.

Risk class

  • R1 — documentation or isolated tests
  • R2 — product behavior
  • R3 — authority, security, protocol, persistence, recovery, or consequential action
  • R4 — release, governance, credentials, generated-source ownership, or cross-repository identity

Review docs/ROADMAP.md, docs/SUPPORT-MATRIX.md, docs/RELEASE-ACCEPTANCE.md, and docs/CONTRIBUTOR-SAFETY.md before making availability or production-readiness claims.

Validation and evidence

Command: xcodebuild test -project native/ios/Psyche.xcodeproj -scheme PsycheApp -destination 'platform=iOS Simulator,id=8E08D33E-D46E-40D6-921C-6B8475046CFC'
Result: Passed. Executed 36 UI tests (8 skipped, 0 failures) and the full PsycheApp scheme succeeded on commit 94a845586a416a9a1c406331a225bfa12644a551.

Command: xcodebuild test -project native/ios/Psyche.xcodeproj -scheme PsycheApp -destination 'platform=iOS Simulator,id=8E08D33E-D46E-40D6-921C-6B8475046CFC' -only-testing:PsycheAppUITests/PsycheAppUITests/testRenamingAPaneUsesTheRemoteActionSheet -only-testing:PsycheAppUITests/PsycheAppUITests/testCleanupConfirmationRoutesIntoRemoteCloseWorkflow -only-testing:PsycheAppUITests/PsycheAppUITests/testPaneActionsMenuListsRemoteLifecycleAndRitualActions
Result: Passed.

Command: xcodebuild test -project native/ios/Psyche.xcodeproj -scheme PsycheCore -destination 'platform=iOS Simulator,id=8E08D33E-D46E-40D6-921C-6B8475046CFC' -only-testing:PsycheCoreTests/ConnectionManagerTests/testStoredHostReconnectIsRefusedWhileReadinessIsRevoked
Result: Passed in a clean baseline worktree while checking an intermittent earlier failure.

Acceptance mapping:

  • Stop and cleanup are visually / semantically distinct: CreatePaneFormTests.testStopAndCleanupMenuActionsStayDistinct and PsycheAppUITests.testPaneActionsMenuListsRemoteLifecycleAndRitualActions

  • Destructive consequence text comes before the action button: ActionSheetPresentationTests.testSectionOrderKeepsContextBeforeContentAndControls, CreatePaneFormTests.testStopConfirmationSaysTheWorkSurvives, and CreatePaneFormTests.testCleanupConfirmationExplainsTheChoicesBeforeContinuing

  • Stale or already-running actions are disabled: CreatePaneFormTests.testPaneControlsDisableHostActionsForStaleOrBusyState, RemoteActionStoreTests.testDuplicateResponseTapSendsExactlyOnceWhileFirstResponseIsBlocked, RemoteActionStoreTests.testSecondStartWhileFirstIsBlockedSendsNothingAndPreservesFirstWorkflow, and RemoteActionStoreTests.testBlockedStartShowsVisibleProgressUntilTheHostReplies

  • Result / error / progress stay visible: RemoteActionStoreTests.testBlockedStartShowsVisibleProgressUntilTheHostReplies, RemoteActionStoreTests.testTransportFailureAfterInputPreservesRecoveryTextAndClearsBusy, RemoteActionStoreTests.testReturnedProtocolErrorBecomesVisibleError, ActionSheetPresentationTests.testFixtureRenameActionProducesInteractiveInputPresentation, and ActionSheetPresentationTests.testFixtureCleanupActionProducesChoicePresentation

  • I added or identified focused coverage for the changed behavior.

  • I ran the owning-surface checks and recorded their exact results.

  • Required checks are terminal on the exact head SHA, or this PR remains draft.

  • I did not treat test counts, source presence, hosted compilation, or simulator success as proof of an unobserved production path.

  • I documented rollback, migration, and recovery implications where applicable.

Generated outputs

  • No generated output changed.
  • Generated output changed from its canonical source/generator and is reproducible without residual drift.

Security and privacy

  • The change preserves project scope, authority, confirmation, receipt, revocation, idempotency, work preservation, and recovery contracts.
  • Public text and artifacts contain no credentials, tokens, passwords, private keys, certificates, signing material, raw prompts, unrestricted terminal output, private repository contents, complete environment dumps, private service URLs, or unredacted personal paths.
  • Suspected vulnerability details are in a private GitHub Security Advisory, not this PR.

Review focus

  1. native/ios/PsycheApp/Sources/PsycheApp/Views/PaneControls.swift, CockpitView.swift, and ActionSheetView.swift for production composition, disabled-state gating, and confirmation semantics.
  2. native/ios/PsycheCore/Sources/PsycheCore/State/RemoteActionStore.swift, RemoteActionPresentation.swift, and the fixture/test updates for visible progress, stale-response safety, and deterministic mobile action coverage.

Release and support impact

  • No support or release claim changes.
  • The support matrix, roadmap, release acceptance, changelog, and user-facing docs are updated consistently.

This is R3 iOS work touching consequential action UI and action-session presentation. It requires independent review before merge; do not merge on my approval alone.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 10, 2026 08:42
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
psyche-build-docs Ready Ready Preview Sep 10, 2026 10:20am UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It is R3 iOS consequential-action UI and remote action-session presentation work that should receive independent human review despite tests covering the primary flows.

Pull request overview

This PR wires the iOS “pane actions” surface into the production app shell so consequential remote lifecycle workflows (merge, create PR, rename, close/cleanup) and ritual actions are executed through the same RemoteActionStore + ActionSheetView presentation path, with explicit stop vs cleanup confirmations and stale/in-flight disabling.

Changes:

  • Added RemoteActionStore.canStartAction(onPane:) and an initial non-dismissable “Waiting for the host…” progress presentation for blocked starts.
  • Extended RemoteActionPresentation with a stable actionLabel and added a PaneAction.presentationLabel mapping, then updated iOS Action Sheet rendering to use it.
  • Expanded iOS pane controls (menu, cleanup confirmation, file browser, rituals menu) and added/updated fixtures + unit/UI tests to cover the production composition path.
File summaries
File Description
native/ios/PsycheCore/Tests/PsycheCoreTests/RemoteActionStoreTests.swift Adds coverage for canStartAction gating and “blocked start shows progress until host replies”.
native/ios/PsycheCore/Tests/PsycheCoreTests/RemoteActionPresentationTests.swift Asserts actionLabel behavior and verifies progress(...) defaults (label + non-dismissable).
native/ios/PsycheCore/Sources/PsycheCore/State/RemoteActionStore.swift Introduces canStartAction and sets an initial progress presentation immediately after marking a pane busy.
native/ios/PsycheCore/Sources/PsycheCore/State/RemoteActionPresentation.swift Adds actionLabel, a progress(...) factory, and centralizes action label mapping via PaneAction.presentationLabel.
native/ios/PsycheCore/Sources/PsycheCore/Fixtures/WorkspaceFixtures.swift Extends workspace fixtures to include per-project ritual publication snapshots for menu/UI coverage.
native/ios/PsycheCore/Sources/PsycheCore/Fixtures/FixtureControlRequests.swift Adds deterministic fixture support for remote pane action start/respond flows and ritual launching to exercise production wiring.
native/ios/PsycheApp/UnitTests/CreatePaneFormTests.swift Adds unit assertions for cleanup confirmation semantics, stale/busy disabling rules, and ritual empty/unavailable messaging.
native/ios/PsycheApp/UnitTests/ActionSheetPresentationTests.swift Adds fixture-based tests ensuring rename/cleanup actions produce expected production Action Sheet presentations.
native/ios/PsycheApp/Tests/PsycheAppUITests/PsycheAppUITests.swift Updates UI coverage to verify the pane actions menu lists lifecycle + rituals and that cleanup routes into the remote close workflow.
native/ios/PsycheApp/Sources/PsycheApp/Views/PaneControls.swift Expands pane actions menu (merge/create PR/rename/files/rituals/stop/cleanup), adds cleanup confirmation, and introduces stale/busy disabling logic.
native/ios/PsycheApp/Sources/PsycheApp/Views/CreatePaneForm.swift Adds cleanup confirmation copy helpers (CleanupPaneConfirmation) emphasizing consequences before destructive continuation.
native/ios/PsycheApp/Sources/PsycheApp/Views/ActionSheetView.swift Refactors section ordering and uses presentation.actionLabel for consistent headers while keeping interactive-dismiss guarding.
native/ios/PsycheApp/Sources/PsycheApp/Views/ActionSheetPresentation.swift Switches action label lookup to PaneAction.presentationLabel and makes ActionSheetSection Hashable for ForEach ordering.
native/ios/PsycheApp/Sources/PsycheApp/CockpitView.swift Presents ActionSheetView from the production cockpit shell whenever RemoteActionStore.presentation is non-nil, dismissing via store.dismiss().
Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@BunsDev

BunsDev commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Independent R3 review of all14 changed files at94a845586a416a9a1c406331a225bfa12644a551 against5dd2a6bdbdfbaddf8623f8d0cff312c943d2988c found three actionable P2 defects; no merge recommended:

  1. PaneControls.swift:173-187 exposes enabled ritual launches from publication availability, but the production rituals.launch route still depends on setMobilePaneExecutors registration, absent at this head. Published rituals lead to command_not_supported. Preserve Wire production ritual publication and execution before restoring mobile controls #242 publication-only gating until production execution is registered and advertised; fixtures cannot provide that authority.
  2. PaneControls.swift:36 switches fixture Rename to RemoteActionStore, but fixture AppModel constructs that store without its request client. Rename/Merge/Create PR/Cleanup show the not-connected error sheet instead of the new fixture handlers. Share the fixture request client across the stores and retain a rename-and-workspace-update assertion, not only sheet presence.
  3. PaneControls.swift:213-220 newly exposes consequential workflows whose response-timeout/disconnect handling clears the busy pane and reports That did not work. The host is not canceled by the15-second client timeout: merge may already have updated the branch before awaiting a hook. Dismissal enables fresh actions without reconciling the committed effect. Preserve unknown/reconciliation-required state and authoritative outcome recovery rather than reporting ordinary failure.

These are source-path findings, distinct from physical-device acceptance. Quality is canceled and the required aggregate failed at this head. Neither #200 nor the Beads-owned #218 acceptance is established by these fixture/simulator results. Uncommitted author-worktree changes were excluded and left untouched. Current fixes must earn a fresh exact-head independent review and terminal required checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants